From f318972807c2b87e16656fd9804c12359d016ee5 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Wed, 11 Nov 2009 16:29:44 +0000 Subject: [PATCH] Fix Special:Activeusers for SQLite --- includes/specials/SpecialActiveusers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 105be7369a..0870fc3285 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -48,6 +48,8 @@ class ActiveUsersPager extends UsersPager { } function getQueryInfo() { + global $wgDBtype; + $dbr = wfGetDB( DB_SLAVE ); $conds = array( 'rc_user > 0' ); // Users - no anons $conds[] = 'ipb_deleted IS NULL'; // don't show hidden names @@ -65,7 +67,7 @@ class ActiveUsersPager extends UsersPager { 'MAX(ipb_user) AS blocked' ), 'options' => array( - 'GROUP BY' => $dbr->implicitGroupby() ? 'rc_user_text' : 'rc_user_text, user_id', + 'GROUP BY' => ( $dbr->implicitGroupby() || $wgDBtype == 'sqlite' ) ? 'rc_user_text' : 'rc_user_text, user_id', 'USE INDEX' => array( 'recentchanges' => 'rc_user_text' ) ), 'join_conds' => array( -- 2.20.1